import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/Login'
  },
  {
    path: '/Login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/Main',
    name: 'Main',
    component: () => import('../views/Main.vue'),
    children: [
      {
        path: '/UserManage',
        name: 'UserManage',
        component: () => import('../views/user/Users.vue')
      },
      {
        path: '/RoleManage',
        name: 'RoleManage',
        component: () => import('../views/role/Roles.vue')
      },
      {
        path: '/MenuManage',
        name: 'MenuManage',
        component: () => import('../views/menu/Menus.vue')
      },
      {
        path: '/DepartmentManage',
        name: 'DepartmentManage',
        component: () => import('../views/business/department/Department.vue')
      },
      {
        path: '/CourseManage',
        name: 'CourseManage',
        component: () => import('../views/business/course/Course.vue')
      },
      {
        path: '/ClassManage',
        name: 'ClassManage',
        component: () => import('../views/business/class/Clazz.vue')
      },
      {
        path: '/TermManage',
        name: 'TermManage',
        component: () => import('../views/business/term/Term.vue')
      },
      {
        path: '/QuotaManage',
        name: 'QuotaManage',
        component: () => import('../views/quota/Quota')
      },
      {
        path: '/TimetableManage',
        name: 'TimetableManage',
        component: () => import('../views/business/timetable/TimeTable.vue')
      },
      {
        path: '/EvaluationTaskManage',
        name: 'EvaluationTaskManage',
        component: () => import('../views/business/Evaluation/EvaluationTask.vue')
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
